#include <stdio.h>
#if 0
n! = n*(n - 1)!;
3! = 3 * 2!;
2! = 2 * 1!;
1! = 1 * 0!;
0! = 1;

f(3) = 3 * f(3-1);
f(2) = 2 * f(2-1);
f(1) = 1 * f(1-1);      n >= 1;
f(0) = 1;               n = 0;
#endif

// 递归条件参不参与运算，如果参与，n-- n++ >> n - 1 n + 1
int fact(int n)
{
    if(n == 0)
    {
        return 1;
    }
    else {
        return n * fact(n - 1);
    }
}

int main()
{
    int f = fact(3);
    printf("f = %d\n",f);
    return 0;
}
